package com.heima.article.controller.v1;

import com.heima.article.service.ApArticleCollectionService;
import com.heima.model.article.dtos.ApArticleCollectDto;
import com.heima.model.behavior.dtos.IsCollectionDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/v1/collection_behavior")
public class ApArticleCollectionController {
    private final ApArticleCollectionService apArticleCollectionService;

    @PostMapping
    public ResponseResult collect(@RequestBody ApArticleCollectDto apArticleCollectDto) {
        apArticleCollectionService.collect(apArticleCollectDto);
        return ResponseResult.okResult(null);
    }

}
